<?php use_stylesheet('forms.css') //load css ?>
    <h1>View Document</h1>
    <div id="form"> 
        <!-- the go back button on the side -->
        <a href="<?php echo url_for('sales/indexOrders') ?>" class="bt_back"><img src="<?php echo image_path('Buttons/bt_arrow_back.png') ?>" onmouseover="this.src='<?php echo image_path('Buttons/bt_arrow_back_hov.png') ?>'" onmouseout="this.src='<?php echo image_path('Buttons/bt_arrow_back.png') ?>'"></a>

        <form action="<?php echo url_for('sales/showDocument?id='.$order->getId()) ?>" method="POST" target="_blank">
        <fieldset>
            <table>
                <tr>
                    <td class="bold">Choose Document: </td>
                    <td><select name="document">
                           <?php if($order->getStatus() == 'quotation'){ ?>
                                <option value="<?php echo null ?>"></option>
                                <option value="Quo">Quotation</option>
                           <?php } else if($order->getCategoryName() == 'stock order'){ ?>
                                <option value="<?php echo null ?>"></option>
                                <option value="Ord">Order</option>
                                <option value="PS">Production Sheet</option>
                                <option value="LoM">Material List</option>                               
                           <?php } else { ?>
                                <option value="<?php echo null ?>"></option>
                                <option value="Quo">Quotation</option>
                                <option value="CoO">Order Confirmation</option>
                                <option value="Ord">Order</option>
                                <option value="PS">Production Sheet</option>
                                <option value="LoM">Material List</option>
                                <option value="PoS">Delivery Note</option>
                                <option value="Inv">Invoice</option>
                           <?php } ?>
                         </select>
                    </td>
                </tr>
                <tr>
                    <td><input type="submit" name="document_button" value="" class="ok"/></td>
                </tr>
            </table>
        </fieldset>
        </form>

    </div> <!-- close div form -->
